﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Teamcenter.Services.Strong.Core._2006_03.DataManagement;
using Teamcenter.Soa.Client.Model;

namespace TC4T_WinForm
{
    public partial class PromptForm : Form
    {
        public PromptForm()
        {
            InitializeComponent();
            c1Combo1.ClearItems();
        }

        private void textBox3_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                try
                {
                    Teamcenter.Soa.Client.Model.ServiceData data = TCHelper.GetPropertyValues(new string[] { tb_uid.Text }, new string[] { "my2_typearray" });
                    string[] temp = TCHelper.GetPropertyValuesByServiceData(data, 0, "my2_typearray");//data.GetPlainObject(0).GetProperty(tb_attname.Text).StringValue;
                    c1Combo1.DataSource = temp;
                    c1Combo1.Refresh();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
    }
}
